# /usr/bin/env python
# -*- coding: utf8 -*-
# title       :
# description :
# author      :'ShenMeng'

import maya.cmds as cmds
import pymel.core as pmel


class Validation(object):
    name = u'NurbsCurve | 曲线检查'
    dataDict = dict()

    def execute(self):
        self.dataDict = {}
        nurbsCureList = pmel.ls(type='nurbsCurve')
        if nurbsCureList:
            for curve in nurbsCureList:
                curveParent = curve.getParent().longName()
                self.dataDict[curveParent] = []
        return self.dataDict

    def correct(self):
        for curve, _ in self.dataDict.items():
            cmds.delete(curve)

    def search(self, obj):
        cmds.select(obj)
